package com.slz3.business.module.wmsManagement.wmsStockDetail.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsStockDetail.domain.WmsStockDetail;
import com.slz3.business.module.wmsManagement.wmsStockDetail.domain.WmsStockDetailCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsStockDetailResAtomic extends WmsStockDetailResExecutor {

    public Mono<ServerResponse> add_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetail wmsStockDetail) {
        return WmsStockDetailResSafeValid.add(req, wmsStockDetail) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, wmsStockDetail);
    }

    public Mono<ServerResponse> delete_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.delete(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetail wmsStockDetail) {
        return WmsStockDetailResSafeValid.modify(req, wmsStockDetail) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, wmsStockDetail);
    }

    public Mono<ServerResponse> info_$WmsStockDetailUpdateLock(ServerRequest req) {
        return WmsStockDetailResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.auditSubmit(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.audit(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.auditReject(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.usingEnable(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$WmsStockDetailUpdateLock(ServerRequest req, WmsStockDetailCondition wmsStockDetailCondition) {
        return WmsStockDetailResSafeValid.usingDisable(req, wmsStockDetailCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
